package com.cssl.utils;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisPlus {
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor page = new PaginationInterceptor();
        // 合理化
         page.setOverflow(true);
        // 设置最大单页限制数量，默认 500 条，-1 不受限制
         page.setLimit(500);
        return page;
    }
}
